﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="PurchaseOrderAdd_Step1.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.PurchaseOrderAdd_Step1"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
   function SetValue(objRadio)
   {
      var hfdHospitalInfo=document.getElementById("ctl00_ContentPlaceHolder1_hfdHospitalInfo");
      hfdHospitalInfo.value="";
      hfdHospitalInfo.value=objRadio.value;
   }
   
   function checkRadioItems(obj, info) {
    var retValue = false;
    var allCheckObj = document.getElementById(obj);
    var inputs = allCheckObj.getElementsByTagName("input")
    for (j = 0; j < inputs.length; j++) {
        if (inputs[j].type == "radio") {
            if (inputs[j].disabled == false && inputs[j].checked == true) {
                retValue = true;
                break;
            }
        }
    }
    if (!retValue) {
        alert(info);
    }
    return retValue;
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">新建采购单</a></li>
        </ul>
    </div>
    <div id="tabcontent">
    <table class="querylist" >
            <tr>
                <td width="50px">
                    地区：</td>
                <td align="left">
                   
                    <asp:DropDownList ID="ddlProvice" runat="server"  >
                        <asp:ListItem Value="">所在省</asp:ListItem>
                    </asp:DropDownList> 
                    &nbsp;<asp:DropDownList ID="ddlCity" runat="server" >
                        <asp:ListItem Value="">所在城市</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<asp:DropDownList ID="ddlCountry" runat="server">
                    <asp:ListItem Value="">所在区县</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td align="left" >
                    <hz:HzButton ID="btnQuery" CssClass="btn" runat="server" Text="查询" OnClick="btnQuery_Click" />
                </td>
            </tr>
    </table>
    </div>
    <asp:GridView ID="gvwHospital" runat="server" AutoGenerateColumns="False" EmptyDataText="暂无符合条件的数据!"
        Width="100%" DataKeyNames="HospitalID,HospitalName">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:BoundField  DataField="HospitalName" HeaderText="医疗机构名称" >
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:TemplateField>
                <ItemTemplate>
                    <input id="rbnSelect" type="radio" name="rbnSelect" onclick="SetValue(this)" value='<%# Eval("HospitalID")+","+Eval("HospitalName") %>'/>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
     <div class="page">
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged"
       >
    </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span> 选择要操作的医疗机构，然后点击“下一步”新建采购单。</span></li>
        </ul>
    </div>
    <div class="listctrl"  style=" text-align:right">
        <hz:HzButton ID="btnNext" runat="server" Text="下一步" onclick="btnNext_Click" 
            OnClientClick="return checkRadioItems('ctl00_ContentPlaceHolder1_gvwHospital','请至少选择一个医疗机构！')" 
            CssClass="btn" OperateType="新增" />
    </div>
    <input id="hfdHospitalInfo" name="hfdHospitalInfo" type="hidden" runat="server" />
    <script type="text/javascript" language="javascript">
    
        new PCAS("ctl00$ContentPlaceHolder1$ddlProvice", "ctl00$ContentPlaceHolder1$ddlCity", "ctl00$ContentPlaceHolder1$ddlCountry" <%=GetDefaultAreaString() %> );
    </script>
</asp:Content>
